package com.rayboo.model;

import java.io.Serializable;
import java.sql.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

import com.google.gson.Gson;

/**
 * 
 * ClubUser
 * 
 * @author ray
 * @date 2016年9月8日 下午8:12:18
 *
 */
@Entity
@Table(name = "club_user")
@NamedQuery(name = "ClubUser.findAll", query = "SELECT u FROM ClubUser u")
public class ClubUser implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	Integer id;
	@Column(name = "userid")
	long userId;
	@Column(name = "user_string")
	String userString;
	String name;
	@Column(name = "wechat_openid")
	String wechatOpenid;
	String phone;
	String password;
	@Column(name = "remember_token")
	String rememberToken;
	@Column(name = "third_token")
	String thirdToken;
	@Column(name = "latest_device")
	String latestDevice;
	@Column(name = "latest_car")
	String latestCar;
	String email;
	String intro;
	String photos;

	Integer experience;

	String honors;;
	Integer gender;
	String avatar;
	String iconid;
	String dvrid;

	Date dob;
	String city;
	
	long createtime;

	long vip;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public long getUserId() {
		return userId;
	}

	public void setUserId(long userId) {
		this.userId = userId;
	}

	public String getUserString() {
		return userString;
	}

	public void setUserString(String userString) {
		this.userString = userString;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getWechatOpenid() {
		return wechatOpenid;
	}

	public void setWechatOpenid(String wechatOpenid) {
		this.wechatOpenid = wechatOpenid;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getRememberToken() {
		return rememberToken;
	}

	public void setRememberToken(String rememberToken) {
		this.rememberToken = rememberToken;
	}

	public String getThirdToken() {
		return thirdToken;
	}

	public void setThirdToken(String thirdToken) {
		this.thirdToken = thirdToken;
	}

	public String getLatestDevice() {
		return latestDevice;
	}

	public void setLatestDevice(String latestDevice) {
		this.latestDevice = latestDevice;
	}

	public String getLatestCar() {
		return latestCar;
	}

	public void setLatestCar(String latestCar) {
		this.latestCar = latestCar;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getIntro() {
		return intro;
	}

	public void setIntro(String intro) {
		this.intro = intro;
	}

	public String getPhotos() {
		return photos;
	}

	public void setPhotos(String photos) {
		this.photos = photos;
	}

	public Integer getExperience() {
		return experience;
	}

	public void setExperience(Integer experience) {
		this.experience = experience;
	}

	public String getHonors() {
		return honors;
	}

	public void setHonors(String honors) {
		this.honors = honors;
	}

	public Integer getGender() {
		return gender;
	}

	public void setGender(Integer gender) {
		this.gender = gender;
	}

	public String getAvatar() {
		return avatar;
	}

	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}

	public String getIconid() {
		return iconid;
	}

	public void setIconid(String iconid) {
		this.iconid = iconid;
	}

	public String getDvrid() {
		return dvrid;
	}

	public void setDvrid(String dvrid) {
		this.dvrid = dvrid;
	}

	public Date getDob() {
		return dob;
	}

	public void setDob(Date dob) {
		this.dob = dob;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public long getCreatetime() {
		return createtime;
	}

	public void setCreatetime(long createtime) {
		this.createtime = createtime;
	}

	public long getVip() {
		return vip;
	}

	public void setVip(long vip) {
		this.vip = vip;
	}

	public String toJson() {
		return new Gson().toJson(this);
	}
}
